#ifndef TEST_BUFFER_H_
#define TEST_BUFFER_H_

#include "base/base.h"
#include "net/poller.h"

namespace net {
class Buffer;
class Event;
class Poller;
}

class TestStdin {
  public:
    TestStdin(net::Poller* poller);

    static void read_cb(int fd, void* arg, int event);
    void ReadAndPrint();

  private:
    int fd_;
    net::Event ev_;
    net::Poller* poller_;
    scoped_ptr<net::Buffer> buffer_;

    const static int32 read_cnt = 3;

    DISALLOW_COPY_AND_ASSIGN(TestStdin);
};
#endif
